package au.com.bellygoodengine.servlets;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import au.com.bellygoodengine.DataAccessObject.DAOHub;

@SuppressWarnings("serial")
public abstract class AbstractServlet extends HttpServlet {
	
	protected DAOHub daoHub = DAOHub.getInstance();
	
	abstract protected void process(HttpServletRequest req, HttpServletResponse resp)
			throws IOException;
		
	public void doPost(HttpServletRequest req, HttpServletResponse resp)
		throws IOException, ServletException {
		process(req, resp);
	}
		
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
		throws IOException, ServletException {
		process(req, resp);
	}
}
